<app-page title="{{ 'aliases' | i18n }}">

  <div class="action-bar">
    <a *ngIf="selectedAccount && selectedAccount.type !== 'offline'" mat-raised-button
       class="reference-button mt-16 mt-sm-0"
       [routerLink]="['add']"
       matTooltip="{{ 'register_alias' | i18n }}"
    >
      <mat-icon>add</mat-icon>
    </a>
  </div>

  <mat-table [dataSource]="dataSource" matSort>

    <ng-container matColumnDef="aliasName">
      <mat-header-cell *matHeaderCellDef mat-sort-header>{{ 'alias_name' | i18n }}</mat-header-cell>
      <mat-cell *matCellDef="let alias">
        <span>{{ alias.aliasName }}</span>
      </mat-cell>
    </ng-container>

    <ng-container matColumnDef="aliasURI">
      <mat-header-cell *matHeaderCellDef></mat-header-cell>
      <mat-cell *matCellDef="let alias">
        <span>{{ alias.aliasURI }}</span>
      </mat-cell>
    </ng-container>

    <ng-container matColumnDef="status">
      <mat-header-cell *matHeaderCellDef></mat-header-cell>
      <mat-cell *matCellDef="let alias">
        <span>/</span> <!-- ?? -->
      </mat-cell>
    </ng-container>

    <!-- <ng-container matColumnDef="actions">
      <mat-header-cell *matHeaderCellDef></mat-header-cell>
      <mat-cell *matCellDef="let alias">
        <button>{{ 'edit' | i18n }}</button>
        <button>{{ 'transfer' | i18n }}</button>
        <button>{{ 'sell' | i18n }}</button>
      </mat-cell>
    </ng-container> -->

    <mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
    <mat-row *matRowDef="let row; columns: displayedColumns;"></mat-row>
  </mat-table>
</app-page>
